package db.user;

import java.util.ArrayList;
import java.util.List;

import dbservice.user.UserDBService;
import o.Authority;
import o.UserType;
import po.Po;
import po.UserPo;

public class UserDBStub implements UserDBService{
	
	public UserDBStub(){
	}

	public UserPo get(UserPo user){
		UserPo po=new UserPo();
		po.setName(user.getName());
		po.setPassword("password");
		po.setUserType(UserType.管理员);
		po.setAuthority(Authority.最高权限);
		return po;
		
	}
	
	public List<UserPo> getAll(){
		UserPo po1=new UserPo();
		po1.setName("admin");
		po1.setUserType(UserType.管理员);
		po1.setAuthority(Authority.最高权限);
		UserPo po2=new UserPo();
		po2.setName("manager");
		po2.setUserType(UserType.总经理);
		po2.setAuthority(Authority.最高权限);
		List<UserPo> l=new ArrayList<UserPo>();
		l.add(po1);
		l.add(po2);
		return l;
	}
	
	public Po add(UserPo user){
		Po po=new Po();
		po.successed();
		return po;
	}
	

	public Po update(UserPo user){
		Po po=new Po();
		po.successed();
		return po;
	}
	
	public Po delete(UserPo user){
		Po po=new Po();
		po.successed();
		return po;
	}
}